package com.icim.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;

import javax.annotation.Resource;

import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import com.icim.entity.Bis_mdl_def;

@Repository
public class BisMdlDefDao {

	@Resource
    private JdbcTemplate icimJdbcTemplate;
	
	public List<Bis_mdl_def> getMdlDefListByMdlId(String mdl_id)
	{
		String sql = "select * from bis_mdl_def where mdl_id = '"+mdl_id+"'";
		return icimJdbcTemplate.query(sql, new RowMapper<Bis_mdl_def>(){

			@Override
			public Bis_mdl_def mapRow(ResultSet rs, int rowNum) throws SQLException {
				Bis_mdl_def bis_mdl_def=new Bis_mdl_def();
				bis_mdl_def.setCut_typ(rs.getString("CUT_TYP"));
				return bis_mdl_def;
			}
			
		});
	}
}
